/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2020.
 * Description: introduce STRICT_DEVMEM control
 * Author: fanglinxu
 * Create: 2020-12-2
 */

#include <linux/fs.h>
#include <linux/init.h>
#include <linux/rtos/strict_devmem.h>

#define SEC_DISABLED	0
#define SEC_ENABLED	1

static int strict_devmem_enable = SEC_ENABLED;

static int __init strict_devmem_cmd(char *str)
{
	if (strstr(str, "relaxed"))
		strict_devmem_enable = SEC_DISABLED;
	return 1;
}
__setup("strict_devmem=", strict_devmem_cmd);

int is_strict_devmem_enable(void)
{
	int status = strict_devmem_enable;
	return status;
}

